package com.han.bom;
import java.util.ArrayList;
/**
 * An extension of the Question object, answers are available as true or false
 * 
 * @author Adjell Ian Pabayos
 * 
 * @version 1.0
 * @since JDK 1.7
 * 
 * @see Question
 *
 */

public class TrueOrFalse extends Question {
	
	

	/**
	 * Default Constructor.
	 * Increments the amount of questions present in the exam, and sets the ID for the question.
	 * Initializes the choices to "True" and "False"
	 */
	public TrueOrFalse() {
		super();
		setTotalQuestions(getTotalQuestions()+1);
		this.setQuestionID("Q"+getTotalQuestions()+"TF");
		this.setChoices(new ArrayList <String>());
		this.getChoices().add("True");
		this.getChoices().add("False");
		this.setAnswer("");
		this.setQuestion("");
		
	}
	/**
	 * Along with the values set by the default constructor, this sets a given question and answer.
	 * 
	 * @param question - the question in readable format
	 * @param answer - the correct answer
	 */
	public TrueOrFalse(String question, String answer){
		this();
		this.setAnswer(answer);
		this.setQuestion(question);		
	}

	
}
